<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:c="http://java.sun.com/jstl/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich">
    <ui:composition>
        <c:if test="#{!LoginManager.verificaLogado}">
            <h:form>
                login:
                <h:inputText class="login-input" value="#{LoginManager.usuario.login}" />
                senha:
                <h:inputSecret class="login-input" value="#{LoginManager.usuario.senha}" />
                <h:commandButton value="login" action="#{LoginManager.efetuarLogin}" />
            </h:form>
        </c:if>
        <c:if test="#{LoginManager.verificaLogado}">
            <h:form>
                <h:outputText value="bem-vindo #{LoginManager.usuarioLogado.simpleName}" />
                <h:commandLink action="#{LoginManager.logout}" >
                    <h:graphicImage value="./img/door_out.png" class="login-link-sair" />
                    <h:outputText  value=" sair" />
                </h:commandLink>
            </h:form>
        </c:if>
    </ui:composition>
</html>

